<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0">
    <title>一只小红薯:高端薯产品专卖开创品牌</title>
{literal}
    <style>
        body{margin: 0;padding: 0;}
        ul,li{ padding:0;margin:0;list-style:none}
        input{border:none;background:none;}
        img{display: block;}
        .bigdiv{background: #fff;width: 7.5rem;margin: 0 auto;}
        .clearfix{clear: both;}
        .imgbox{width:7.5rem;margin: 0 auto;}
        .imgbox img{width:7.5rem;}
        .formbigbox{width: 7.5rem;margin: 0 auto;padding-top: 0.2rem;padding-bottom: 1.2rem;}
        .formbigbox ul li{display: block; width: 7.1rem;font-size: 0.26rem;font-family: "微软雅黑";line-height: 0.65rem;margin: 0 auto;color: #666;}
        .formbigbox ul li input{display: block; height: 0.8rem;width: 7.06rem;border: 0.02rem solid #999;border-radius: 0.07rem;background: #fff;}
        .formbigbox ul li span{color: red;}
        .formbigbox ul select{display: block; width: 7.06rem;margin: 0 auto;height: 0.8rem;border-radius: 0.07rem;background: #fff;}
        .formbigbox ul li .submitbut{background: red;border: none;color: #fff;margin-top: 0.60rem;font-size: 0.26rem;}
        .onlinebox{width: 7.5rem;position: fixed;bottom: 0;left: 50%;margin-left: -3.75rem;}
        .left99 img{float: left;width: 3.75rem;}
        .right99 img{float: left;width: 3.75rem;}
    </style>
    {/literal}
    <script src="http://lc-news.oss-cn-beijing.aliyuncs.com/redpacket/js/jquery.min.js"></script>
</head>
<body>

<div class="bigdiv">
    <div class="formbigbox">
        <div  name="bdydliuyanban">
            <input type="hidden" name="action" value="post" />
            <input type="hidden" name="diyid" value="5" />
            <input type="hidden" name="do" value="2" />
            <ul>
                <li>您的称呼</li>
                <li><input type="text" name="nickname_2" id="nickname_2"  value="" autocomplete="off"/></li>

                <li>联系电话<span>(必填)*</span></li>
                <li><input type="text" name="mobile_2" id="mobile_2"  value="" autocomplete="off"/></li>

                <li>加盟意向</li>
                <select name="intention_2" >
                    <option value="">--请选择--</option>
                    <option value="1">单店加盟</option>
                    <option value="2">区域加盟</option>
                </select>

                <input  type="hidden" name="toutiaotime" id="toutiaotime"  value="" />
                <script type="text/javascript">
                    window.onload = function(){
                        var nowDate = new Date();
                        var str = "pc端"+nowDate.getFullYear()+"-"+(nowDate.getMonth() + 1)+"-"+nowDate.getDate()+" "+nowDate.getHours()+":"+nowDate.getMinutes()+":"+nowDate.getSeconds();
                        document.getElementById("toutiaotime").value=str;
                    }
                </script>
                <input type="hidden" name="dede_fields" value="toutiaoname,text;toutiaodhua,text;toutiaoyixiang,select;toutiaotime,text" />
                <input type="hidden" name="dede_fieldshash" value="af744ae6f1838e12791fdef986212231" />
                <input type="hidden" name="url" value="{$url}">

                <li onclick="sub()">
                    <input class="submitbut form_user_2"  type="submit" name="submit" value="提 交"  />
                </li>
            </ul>
        </div>

    </div>


</div>
</body>
{literal}
<script>
    /*手机号码验证*/
    function bdydshouji(){
        var xyz=document.forms["bdydliuyanban"]["toutiaodhua"].value;
        if(xyz.length==0)
        {
            alert('请输入手机号码！');

            return false;
        }
        if(xyz.length!=11)
        {
            alert('请输入有效的手机号码！');

            return false;
        }

        var myreg = /^(((11[0-9]{1})|(12[0-9]{1})|(13[0-9]{1}))|(14[0-9]{1}))|(15[0-9]{1}))|(16[0-9]{1}))|(17[0-9]{1}))|(18[0-9]{1}))|(19[0-9]{1}))+\d{8})$/;
        if(!myreg.test(xyz))
        {
            alert('请输入有效的手机号码！');

            return false;
        }
    }
</script>
<script>
    /*等比缩放js*/
    (function (doc, win) {
        var docEl = doc.documentElement,
                resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
                recalc = function () {
                    var clientWidth = docEl.clientWidth;
                    if (!clientWidth) return;
                    if(clientWidth>=750){
                        docEl.style.fontSize = '100px';
                    }else{
                        docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
                    }
                };

        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener('DOMContentLoaded', recalc, false);
    })(document, window);




</script>
{/literal}
    <script>
        function sub(){
            var $userEl=$('input[name="nickname_2"]'),nickname=$userEl.val();
            var $mobileE1=$('input[name="mobile_2"]'),mobile=$mobileE1.val();
            var intentionE1 = $("select[name='intention_2']");
            var intention = intentionE1.val();
//            var domain = document.URL;
            var tg_url = $('input[name="url"]').val();


            //手机号码验证
            if(mobile.length == 0  ){
                alert("注册手机号不能为空");
                return false;
            }
            if(mobile.length!=11)
            {
                alert('请输入有效的手机号码！');
                return false;
            }
            if(!(/^1[123456789]\d\d\d\d\d\d\d\d\d$/.test(mobile))){
                alert("手机号码有误，请重填");
                return false;
            }

//            alert(nickname);
            $.ajax({
                type: 'get',
                url: 'http://xhs.xhs1985.com/public/userOrderDeal',
                dataType: "jsonp",
                jsonp: "callback",
                jsonpCallback:"flightHandler",
                async: false,
                data:{
                    nickname:nickname,
                    mobile:mobile,
                    intention:intention,
//                    province:pro,
//                    city:city，
                    domain:tg_url
                },
                success:function (result) {
//                    alert("success");
                    if(result.status == 200){
                        alert(result.data);
                    }else {
                        alert(result.error);
                    }

                },
                error:function (result) {
                    layer.msg('服务器异常，请稍候再试！');
                }
            })
        }
    </script>

</html>